<?php
require_once "Zend/Tokenizer/String/Abstract.php";

/**
 * @category   Zend
 * @package    Zend_Tokenizer
 * @copyright  Salomon BRYS
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Tokenizer_String_Char extends Zend_Tokenizer_String_Abstract
{
	/**
	 * Constructor
	 *
	 * @param Zend_Tokenizer_Interface $producer
	 */
	public function __construct(Zend_Tokenizer_Interface $producer)
	{
		parent::__construct($producer);
	}

	/**
	 * return wether there's at least one token ready.
	 *
	 * @return bool
	 */
	protected function checkHasToken($data)
	{
		return !empty($data);
	}

	/**
	 * Return the next token.
	 *
	 * @return mixed
	 */
	protected function extractFirstToken(&$data)
	{
		$ret = $data[0];
		$data = substr($data, 1);
		return $ret;
	}
}
